/**
 * Pinpoint Node.js Agent
 * Copyright 2020-present NAVER Corp.
 * Apache License v2.0
 */

'use strict'

const SocketStateCode = {
  NONE: 1,
  BEING_CONNECT: 2,
  CONNECTED: 3,

  RUN_WITHOUT_HANDSHAKE: 10,
  RUN_SIMPLEX: 11,
  RUN_DUPLEX: 12,

  BEING_CLOSE_BY_CLIENT: 20,
  CLOSED_BY_CLIENT: 22,
  UNEXPECTED_CLOSE_BY_CLIENT: 26,

  BEING_CLOSE_BY_SERVER: 30,
  CLOSED_BY_SERVER: 32,
  UNEXPECTED_CLOSE_BY_SERVER: 36,

  ERROR_UNKNOWN: 40,
  ERROR_ILLEGAL_STATE_CHANGE: 41,
  ERROR_SYNC_STATE_SESSION: 42,
}

module.exports = {
  SocketStateCode
}
